package com.huika.renrench.control.my.activity;

import android.view.View;
import android.view.ViewGroup.LayoutParams;

import com.huika.lib.utils.DensityUtils;
import com.huika.renrench.R;
import com.huika.renrench.control.common.base.BaseAct;
import com.huika.renrench.utils.ShareUtils;
import com.huika.renrench.view.TitleBarHelper;

/**
 * 我要邀请
 * @author wuwenfeng
 * 
 */
public class ToInviteActivity extends BaseAct {

	@Override
	public void setRootView() {
		setContentView(R.layout.activity_to_invite);
	}
	
	@Override
	protected void initWidget() {
		super.initWidget();
		TitleBarHelper barHelper = new TitleBarHelper(this, -1);
		barHelper.setLeftMsg("返回");
		barHelper.setTitleMsg("我要邀请");
		barHelper.setRightMsg("分享");
		barHelper.setOnRightClickListener(this);
		
		View iv_pic = findViewById(R.id.iv_to_invite_pic);
		//动态改变图片大小
		LayoutParams layoutParams = iv_pic.getLayoutParams();
		int screenW = DensityUtils.getScreenW(this);
		layoutParams.width = screenW;
		layoutParams.height = screenW * 684 / 640;
		iv_pic.setLayoutParams(layoutParams);
		
	}
	
	@Override
	public void widgetClick(View v) {
		
		if(R.id.right == v.getId()){
			//TODO 弹出分享对话框
			new ShareUtils().getShareUtils(getWindow().getDecorView(), this);
		}
	}
	
}
